原题链接在这里:https://leetcode.com/problems/path-with-maximum-minimum-value/ 题目: Given a matrix of integ ...
原题链接在这里:https://leetcode.com/problems/path-with-maximum-minimum-value/ 题目: Given a matrix of integ ...
Union Find算法基础 Union Find算法用于处理集合的合并和查询问题,其定义了两个用于并查集的操作: Find: 确定元素属于哪一个子集,或判断两个元素是否属于同一子集 U ...
原题链接在这里:https://leetcode.com/problems/connecting-cities-with-minimum-cost/ 题目: There are N cities ...
Union Find Princeton's lecture note on Union Find in Algorithms and Data Structures It is a ...
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), ...
Use Union Find to figure out the number of connected components ...
There are N students in a class. Some of them are friends, while some are not. Their friendship is t ...
原题链接在这里:https://leetcode.com/problems/lexicographically-smallest-equivalent-string/ 题目: Given stri ...
图基础 图(Graph)应用广泛,程序中可用邻接表和邻接矩阵表示图。依据不同维度,图可以分为有向图/无向图、有权图/无权图、连通图/非连通图、循环图/非循环图,有向图中的顶点具有入度/出度的概念。 ...
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), ...